package cc.linker.steplink.crm.dao;

import cc.linker.steplink.crm.domain.UpdateBindCustomerPo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface PersonalCenterDao {
    Map<String, Object> getCustomerByOpenIdAndToken(@Param(value = "openId") String openId, @Param(value = "token") String token);

    Map<String, Object> getCustomerByGlobalOpenid(@Param(value = "globalOpenId") String globalOpenId, @Param("token") String token);

    Map<String, Object> get(@Param(value = "customerId") String customerId, @Param(value = "payMode") Integer payMode);

    Map<String, Object> getOrderNums(@Param(value = "customerId") String customerId, @Param(value = "payMode") Integer payMode);

    Integer getPayMode(@Param(value = "orgId") String orgId);

    Map<String, Object> getBindInfo(@Param(value = "customerId") String customerId);

    void bindPhone(Map<String, Object> params);

    Map<String,Object> getCustomerByPhone(Map<String, Object> params);

    void updateCustomerInfo(Map<String, Object> temps);

    void insertCustomerSource(Map<String, Object> sources);

    Map<String, Object> getCustomerSourceByCustomerId(@Param(value = "customerId") String customerId);

    void addBusiPhone(Map<String, Object> temp);

    Integer updateYZJUser(Map<String,Object> user);

    Integer removeCustomerByCustomerId(@Param("customerId")String customerId);

    Integer removeCustomerInfo(@Param("customerId")String customerId);

    Map<String,Object> getCustomerInfo(@Param("customerId")String customerId);

    Integer updateCInfo(Map<String,Object> customer);

    void updateBindPhone(Map<String, Object> params);

    void updateMissPhone(Map<String, Object> params);

    Map<String, Object> getCustomerByCid(String customerId);

    Integer getAccountByCid(String customerId);

    void addLoginLog(Map<String, Object> loginParam);

    void changeLoginCustomer(@Param("updateBindCustomerPo") UpdateBindCustomerPo updateBindCustomerPo);

    String ifExistBindPhone(Map<String, Object> params);

    //修改用户的支付openid
    void updatePayOpenIdByCustomerId(@Param("customerId") String customerId, @Param("payOpenId") String payOpenId);

    int isAppVip(String customerId);

    List<Map<String, Object>> levelRight(String levelId);

    Map<String, Object> getLevelRightDetail(int rightId);

    Map<String, Object> getRule(Map<String,Object> param);

    List<Map<String, Object>> getScoreLog(Map<String,Object> param);

    void updateCustomerName(Map<String, Object> params);

    void updateWxGender(Map<String, Object> params);

    void updateCustomerArea(@Param("customerArea") String customerArea,@Param("customerId") String customerId);

    void updateCustomerBirth(Map<String, Object> params);

    Integer getUserCount(@Param("customerId") String customerId);

    void insertUserWx(@Param("customerId") String customerId);

    Map getoldInfoByOpenId(@Param("openid") String openid);
}
